package com.runfast.paotui.service;

import com.runfast.common.service.IService;
import com.runfast.common.web.entity.Result;
import com.runfast.paotui.dao.model.Order;
import com.runfast.paotui.dao.model.OrderExample;
import com.runfast.paotui.web.dto.OrderDto;
import com.runfast.waimai.dao.model.RunfastGoodsSellRecord;
import com.runfast.waimai.util.PageBean;

import java.lang.reflect.InvocationTargetException;
import java.util.List;
import java.util.Map;
import java.util.concurrent.Future;

public interface OrderService extends IService<Order, Integer, OrderExample> {
 List<Order> findByShopperid(Integer id) ;
 PageBean<Order> getPageBean4Driver(Integer pageSize, Integer page, Integer otype, Integer shopperId, Integer agentid, Integer teamid);

 List<Order>  findByShopperidAndStatus(Integer driverId, Integer status1);
    Order findByUseridAndCode(Integer userid ,String orderNo);
    Order findByShopperidAndCode(Integer shopperid,String orderNo);
    Order get(Integer id);
    Result confirm(Order order);

    Result take(Integer driverId, Integer orderId);

    Result cancel(Integer userId, Integer orderId);

    List<Map<String, Integer>> selectIdUserIdByExample(OrderExample example);

    Result fillIn(Order order);

    OrderDto toOrderDto(Order order) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException;

 void updateStatusAndTime(Order orderuser2);
}